Optoelectronic semiconductor devices which emit a beam of light when optically actuated have been developed. One such device is described in U.S. Pat. No. 4,152,713 to John A. Copeland, III et al, issued May 1, 1979, entitled UNIDIRECTIONAL OPTICAL DEVICE AND REGENERATOR. This device includes a body of a semiconductor material having four layers of alternating opposite conductivity type, i.e. PNPN or NPNP, forming PN junctions between adjacent layers. Preferably, the inner two layers are made of a direct-gap semiconductor material, and the outer two layers are made of a wider-band-gap material so as to form a heterojunction between the outer two layers and each of the inner two layers. These heterojunctions act to confine electrons in the inner two layers where they are converted to photons. The photons are emitted from the device as a beam of light. The device is operated by applying a voltage across the device which is lower than the threshold voltage necessary in the dark to turn on the device and generate light. A beam of light is directed into the device which lowers the threshold voltage and thereby causes light to be generated in the device. The light is then emitted from the device as a beam. Although the device is turned on by directing a beam of light therein, it can only be turned off by removing the electrical input. Thus, to operate the device for optical communication purposes, the electrical input must be pulsed. Since the device is intended to be an optically operated device, it would be desirable to be able to turn the device both off and on optically.